An improved composite ship magnetic field model with ellipsoid and magnetic dipole arrays

In order to simultaneously maintain the ship magnetic field modeling accuracy, reduce the number of coefficient matrix conditions and the model computational complexity, an improved composite model is designed by introducing the magnetic dipole array model with a single-axis magnetic moment on the basis of the hybrid ellipsoid and magnetic dipole array model. First, the improved composite model of the ship's magnetic field is established based on the magnetic dipole array model with 3-axis magnetic moment, the magnetic dipole array model with only x-axis magnetic moment, and the ellipsoid model. Secondly, the set of equations for calculating the magnetic moments of the composite model is established, and for the problem of solving the pathological set of equations, the least-squares estimation, stepwise regression method, Tikhonov, and truncated singular value decomposition regularization methods are introduced in terms of the magnetic field, and generalized cross-validation is used to solve the optimal regularization parameters. Finally, a ship model test is designed to compare and analyze the effectiveness of the composite and hybrid models in four aspects: the number of coefficient matrix conditions of the model equation set, the relative error of magnetic field fitting, the relative error of magnetic field extrapolation, and the computational time complexity. The modeling results based on the ship model test data show that the composite model can be used for modeling the magnetic field of ships, and compared with the hybrid model, it reduces the number of coefficient matrix conditions and improves the computational efficiency on the basis of retaining a higher modeling accuracy, and it can be effectively applied in related scientific research and engineering.


Improved composite equivalent source magnetic field model
Ship magnetic field modeling refers to the construction of some kind of model to accurately reflect the spatial distribution law of the ship magnetic field, and at the same time, it is necessary to extrapolate the measured magnetic field to the location of other depths, which can usually be equivalent to the ship as a hybrid model of ellipsoid and magnetic dipole array 14 , in order to further enhance the accuracy of magnetic field simulation on the ship while taking into account the complexity of the model, the introduction of a uniaxial magnetic moment on the basis of the hybrid model of the In order to further improve the magnetic field simulation accuracy of the ship while taking into account the model complexity, the magnetic dipole array model with uniaxial magnetic moment is introduced on the basis of the hybrid model, and the improved composite equivalent source magnetic field model of the ship is designed.Considering that the ship is in a stable and direct sailing state in a short period of time, the ship's intrinsic magnetic field and induced magnetic field can be studied together, so the intrinsic magnetic moment and induced magnetic moment of the magnetic dipole are no longer considered differently.

General structure of the composite magnetic field model
The improved composite equivalent source magnetic field model consists of 3 parts, part 1 is a magnetic dipole array model with a single-axis magnetic moment (x-direction), part 2 is a magnetic dipole array model with 3 axes, and part 3 is a single ellipsoid model as shown in Fig. 1.The ellipsoid is located in the center of the ship, and its long axis is equal to the length of the ship and the short axis is equal to the width of the ship, which is used to fit the macroscopic magnetic field of the ship.The magnetic dipole array with 3 axes is uniformly distributed on the ship's draft line to simulate the ship's localized inhomogeneous magnetic field.Magnetic dipole arrays with single-axis magnetic moments are located at a certain depth below the ship's draft line for fine-tuning the magnetic field.The carrier coordinate system (b-system) is established with the ship center as the origin, and the sensor coordinate system (s-system) is established with the sensor center as the origin.To simplify the representation, the variables under the b-system are not superscripted.

Magnetic field calculation formulas
The corresponding magnetic field calculation formulas for the 3 models are as follows: The magnetic field of a magnetic dipole array model with a 3-axis magnetic moment is calculated as where B DA1 = B x B y B z T is the magnetic field vector of the magnetic dipole array model with 3-axis magnetic moments, and m i j i = 1, 2, • • • , M; j = x, y, z is the magnetic moment of the ith magnetic dipole j-axis in the b-series.The coefficients in the coefficient matrix are d is the coordinate of the magnetic sensor in the b-system relative to the ith magnetic dipole, r = x y z T is the coordinate of the magnetic sensor in the b-system, r i d = i − (M + 1) 2 �L 0 0 T is the coordinate of the ith magnetic dipole in the b-system, �L = L (M − 1) is the magnetic dipole spacing, and L is the length of the ship.
The magnetic field of a magnetic dipole array model with a uniaxial magnetic moment is given by where B DA2 = B x B y B z T is the magnetic field vector of the magnetic dipole array model with uniaxial magnetic moment, and m i x is the magnetic moment of the ith magnetic dipole in the b-system.The coefficients in the coefficient matrix are a is the coordinate of the magnetic sensor in the b-system with respect to the ith magnetic dipole, r i d = i − (N + 1) 2 �L ′ 0 z d T is the coordinate of the ith magnetic dipole in the b-system, L ′ is the magnetic dipole spacing, and z d is the distance between the magnetic dipole and the draft.The ellipsoidal magnetic field is given by (1) www.nature.com/scientificreports/ where B E = B x B y B z T is the magnetic field vector of the ellipsoid and m M+N+1 is the magnetic moment of the ellipsoid.The coefficients in the coefficient matrix are L is the length of the ship and W is the width of the ship.
The composite magnetic field model magnetic field B C is calculated as where the magnetic moments m C of the magnetic dipole and ellipsoid are The coefficient matrix F C is where i = 1, • • • , M corresponds to the magnetic dipole array model with a 3-axis magnetic moment, to the magnetic dipole array model with a single-axis magnetic moment, and i = M + 1, • • • , M + N corresponds to the ellipsoid model.

Composite magnetic field model magnetic moment calculation method
The problem of calculating the magnetic moment of a ship's magnetic field model can be regarded as a problem of solving a system of overdetermined Equations. 14.For the problem of solving the overdetermined equations, the least squares estimation, stepwise regression method 14 , Tikhonov-GCV, and TSVD-GCV regularization methods are used to solve the problem, respectively.

Equations for solving magnetic moment
A schematic diagram of the magnetic field measurement at a certain depth plane below the ship is shown in Fig. 2. In the actual magnetic field measurement, the measurement data will be interfered by noise, so the system of equations for solving the magnetic moment under the b-system is where T is the magnetic field at N measurement points in the carrier coordinate system and the observation noise is Gaussian white noise, e ∼ N(0, R) .The coefficient matrix F is (4) www.nature.com/scientificreports/where the coefficients are calculated according to Eqs. ( 2), ( 3) and ( 5) and the magnetic moments are the same as Eq. ( 7).

Least squares estimation
Considering the equations for solving the magnetic moment can be reduced to the following observation equation , assuming that the observation noise is Gaussian white noise, e ∼ N(0, R) .The singular value decomposition of A is given by where The linear model in Eq. ( 11) satisfies the Gauss-Markov theorem, and the optimal estimate of the magnetic moment is the optimal linear unbiased estimation (BLUE) 5 The spectral decomposition of LS estimation for unknown parameters takes the form 25 where u i ∈ R m and v i ∈ R n are the ith column vectors of U and V, respectively.The mean square error of the least squares estimation is

The trace of MSE xLS is
The trace of MSE xLS reflects the difference between the estimate and the true value.When the condition number λ max /λ min is very large, the LS estimates are susceptible to noise leading to unstable solutions.

Tikhonov regularization
The Tikhonov regularization method filters or attenuates small singular values to retain all the information, and the Tikhonov regularization takes the form 26 where α is the regularization parameter and L is the regularization matrix.The solution of the regularization estimation is The spectral decomposition of the Tikhonov regularized estimate is of the form 25 (10) where α is the regularization parameter.The mean square error of the Tikhonov regularization estimate is The trace of MSE xTikh is Too small a value of the regularization parameter α tends to lead to under-regularization and vice versa for over-regularization.

Truncated singular value decomposition
Removing the n-k components of the least-squares estimate in the hyperspectral domain, the spectral decomposition of the TSVD estimate takes the form 25 The mean square error of the TSVD estimation is The trace of MSE xTSVD is Too small a value of the truncation parameter k tends to lead to over-regularization and vice versa for under-regularization.

Regularized parameter optimization methods
Regularization parameter optimization methods include Discrepancy Principle 28 , L-curve 29 , GCV 30 , NCP 28 , etc. L-curve is a logarithmic graph that characterizes the relationship between and change in terms of α parameter, and the approximation of the optimal regularization parameter can be computed by locating the corners of the L-curve, and for the continuous L-curve, the corner is the point with maximum curvature on the L-curve of the logarithmic scaled L-curve at the point with maximum curvature on the L-curve 31 .However, the L-curve method is not applicable in the case of no noise or very low noise 28 .The goal of GCV is to find the value of α such that the data can be predicted as accurately as possible.The Discrepancy Principle relies on the accurate estimation of the error paradigm.The GCV aims to reduce the prediction error, and it is a more robust method.The NCP is a statistically based method, which may misidentify low-frequency noise as signals.low-frequency noise as a signal, which leads to unsmoothing.
For the magnetic field model magnetic moment solution problem, GCV is used for parameter optimization.The GCV equations are 26,32 where From the Scherman-Morrison-Woodburg theorem we have Substituting Eq. ( 26) into Eq.( 25), we get Thus, the optimal regularization parameter is Tr A T A + αI www.nature.com/scientificreports/ The selection of regularization parameters α and k using the GCV method is shown in Fig. 3.

Ship model test setup
The test uses a scaling-down ship model, whose dimensional parameters are the dimensions of the real ship corresponding to the ship model, not the dimensions of the ship model itself, and the depths, positive transits, and trajectories are the measured dimensions of the real ship corresponding to the ship after conversion.The ship model test measured the magnetic fields of 3 tracks at each of the 2 depths, as shown in Table 1.Three measurement lines were uniformly set below the model at a distance of 1W and 2W, with z-coordinates of 1W and 2W, and y-coordinates of − 0.5 W, 0, and 0.5 W, which corresponded to the port, keel, and starboard sides of the ship model, respectively.There are 81 measurement points in each measurement line, with x coordinates of − 1.5 L-1.5 L (L denotes the length of the ship, W denotes the width of the ship).The magnetic sensor is Mag-13MSL100, and the position is shown in Fig. 4. The single-point magnetic field measurement is used to move the ship on the track with equal spacing, and every time the ship moves, a period of time is measured, and the average value of the period is calculated as the corresponding magnetic field value of the measurement point, and the magnetic field value of each point is connected to form a continuous ship magnetic field through the    www.nature.com/scientificreports/characteristics.The following is the magnetic field modeling of the ship model based on the composite model and the magnetic field measurement data.

Improved composite model versus traditional hybrid model setup
The parameters of the improved composite model and the conventional hybrid model 33 are shown in Table 2.
In order to compare the two models in terms of modeling accuracy of the ship's magnetic field, the number of coefficient matrix conditions and other factors, the same number of magnetic dipoles and the number of ellipsoids are used.For the large ship model in the test, the number of magnetic dipoles needs to take a higher number to ensure the modeling accuracy 34 , and the ellipsoids of the two models have the same size and the same coordinates in the b-system.The difference between the two models is shown in Fig. 5.In the hybrid model, the spacing of the magnetic dipoles is calculated based on the ship length.In the composite model, the spacing of the 3-axis magnetic moment magnetic dipole is calculated according to the length of the ship, and the spacing and coordinates z d of the x-axis magnetic moment magnetic dipole are adjusted according to the dimensions of the ship.

Model evaluation indicators
(1) The coefficient matrix condition number is The condition number is related to b only and reflects the effect of the original data on the solution.If the condition number is larger, the system of equations is more pathological and the solution is less robust.
(2) The relative error of the magnetic field fit is where F is the coefficient matrix, F m is the simulated magnetic field for solving the magnetic moment calculation, and B is the measured magnetic field without noise.
(3) The relative error of the magnetic field extrapolation is where F ′ is the matrix of coefficients in the other plane, F ′ m is the in-plane magnetic field in the other plane for solving the magnetic moment calculation, and B ′ is the noise-free measured magnetic field in the other plane.(4) CPU computation time is the time required for the algorithm to complete the magnetic moment estimation.The computer processor is 11th Gen Intel(R) Core (TM) i5-1155G7 @ 2.50 GHz with 16.0 GB of RAM.

Comparative analysis of models
The LS algorithm, stepwise regression method, Tikhonov-GCV, and TSVD-GCV algorithms were used to solve the magnetic moments, respectively.In performing the magnetic moment solution for the ship model, the observed magnetic field data were measured at a depth of 1 time the ship width and extrapolated to a depth of 2 times the ship width.The magnetic field measurement data under different signal-to-noise ratio conditions are used for model validation, and the noise is Gaussian white noise.The number of coefficient matrix conditions ( 29)  www.nature.com/scientificreports/ is shown in Table 3, from which it can be seen that the number of coefficient matrix conditions of the improved composite model is only 0.2091 of the number of coefficient matrix conditions of the hybrid model, from which it can be seen that the degree of pathology of the equation set of the improved composite model is much smaller than that of the equation set of the hybrid model, and thus the robustness of the solution of the magnetic moments is stronger.The relative error of magnetic field and the relative error of magnetic field extrapolation are shown in Table 4 and Fig. 6.Combining the graphs, it can be seen that the modeling accuracies of the two models under different SNR conditions with different magnetic moment solving algorithms are not much different, with the maximum difference of about 3%, and the relative error of magnetic field fitting and the relative error of magnetic field extrapolation of the composite model under high SNR conditions are both within 10%, and the relative error of magnetic field fitting can also be reached to 3% under 0 dB SNR conditions, and the relative error of magnetic field extrapolation can also be reached to 4% under 0 dB SNR conditions.The relative errors of magnetic field fitting and magnetic field extrapolation are within 30% and 15% even at 0 dB SNR.The CPU computation time is shown in Table 5 and Fig. 7. Combined with the graphs, it can be seen that the computation time of the composite model is less than that of the hybrid model when solving magnetic moments with the four algorithms, which indicates that the computational complexity of the composite model is less than that of the hybrid model.At 0 dB SNR, the depth of solving is 50 m.The depth of the composite model is 50 m, and the depth of the composite model is 50 m.The depth of the composite model is 50 m.When the SNR is 0 dB, the spatial distribution of the magnetic field at a depth of 50 m based on the TSVD-GCV algorithm is shown in Fig. 8, from which it can be seen that the spatial distribution of the magnetic field is basically the same for the two models, which suggests that the composite model is able to realize the effective modeling of the ship's magnetic field.The magnetic moments solved based on the TSVD-GCV algorithm are shown in Fig. 9, from which it can be seen that the magnetic moments of the two models are quite different.The magnetic field fitting curve (SNR = 0 dB, z = 17.2 m) is shown in Fig. 10, and the magnetic field extrapolation curve (SNR = 0 dB, z = 17.2 m → 28.8 m) is shown in Fig. 11.From the magnetic field fitting curves and extrapolation curves, the composite model still has a high fitting accuracy for the ship's magnetic field under low SNR conditions.In summary, the comparison of the two model indicators is shown in Table 6.From the four evaluation indexes, the composite model is comparable to the hybrid model in terms of the relative error of magnetic field fitting and the relative error of magnetic field extrapolation, and is able to achieve higher modeling accuracy.In terms of the number of coefficient matrix conditions, the composite model is smaller than the hybrid model, and the magnetic moment solving is more robust.In terms of computational complexity, the composite model has a smaller computational degree, which is more favorable to engineering practice.Therefore, the composite model can be used for modeling the magnetic field of ships, and compared with the hybrid model, the computational speed is improved on the basis of retaining higher modeling accuracy.

Conclusion
The improved ellipsoid and magnetic dipole array composite model proposed in this paper has the following advantages over the traditional hybrid model: 1.While maintaining a high magnetic field modeling accuracy, the number of coefficient matrix conditions is effectively reduced, which improves the model robustness.2. The model complexity is reduced, effectively reducing the computational complexity, which is conducive to engineering applications.3. The composite model can be solved by a variety of regularization methods, and all of them can achieve high modeling accuracy, and the relative error of the magnetic field fitting and the magnetic field extrapolation error under high signal-to-noise ratio conditions are less than 0.1.

Figure 1 .
Figure 1.Improved composite magnetic field model for ships.

Figure 2 .
Figure 2. Schematic diagram of ship's magnetic field measurement.

Figure 4 .
Figure 4. Ship model test system.(a) Schematic diagram of the test system, (b) Measuring devices.

Figure 5 .
Figure 5.Comparison of the two models.

Figure 6 .Table 5 .Figure 7 .
Figure 6.Comparison of relative errors of magnetic field fitting and relative errors of magnetic field extrapolation for two models.(a) Relative error of magnetic field fitting for composite model, (b) Composite model magnetic field extrapolation relative error, (c) Relative error of the hybrid model magnetic field fit and (d) Relative errors in extrapolation of hybrid model magnetic fields.

Table 1 .
Ship model test conditions.

Table 2 .
Improved composite and conventional hybrid model parameters.

Table 3 .
Coefficient matrix condition number.Significant values are in [bold].

Table 4 .
Relative error of magnetic field fitting and relative error of magnetic field extrapolation.

Table 6 .
Comparison of model indicators.Significant values are in [bold].